<?php

namespace common\models\tsline;

use Yii;

/**
 * This is the model class for table "{{%ts_comment_up}}".
 *
 * @property int $id
 * @property string $type 评论类型 article|dynamic
 * @property int $comment_id 评论ID
 * @property int $user_id 用户ID
 * @property int $is_up 是否点赞
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class TslineCommentUp extends \yii\db\ActiveRecord {

    use \common\traits\TimestampBehavior;

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%ts_comment_up}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['comment_id', 'user_id', 'is_up', 'created_at', 'updated_at'], 'integer'],
            [['type'], 'string', 'max' => 30],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'type' => '评论类型 article|dynamic',
            'comment_id' => '评论ID',
            'user_id' => '用户ID',
            'is_up' => '是否点赞',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
